<!-- 签到明细 -->
<template>
	<view>
		<view class='sign-record'>
		   <view class='list' v-for="(item,index) in 1" :key="index">
		      <view class='item'>
		         <!-- <view class='data'>2021-5</view> -->
		         <view class='listn'>
		            <view class='itemn u-f-jsb u-f-ac' v-for="(itemn,indexn) in record" :key="indexn">
		               <view>
		                  <view class='name'>签到奖励</view>
		                  <view>{{itemn.sign_time}}</view>
		               </view>
		               <view class='num font-color'>+{{itemn.sign_point}}</view>
		            </view>
		         </view>
		      </view>
		   </view>
		   <view>
		   	<our-loading  :active='loadMore' :translateY='90' text="loading..."  />
		   	<om-nomore :visible="noMoreFlag" bgcolor="#fff"></om-nomore>
		   	<tui-no-data imgUrl="https://zj.gdwrh.com/fnyg/static/images/my-img/img_nodata.png" v-if="noData1" :fixed="false">暂无内容</tui-no-data>
		   </view>
		   
		    <view class='loadingicon acea-row row-center-wrapper' v-if="2 > 0">
		    </view>
		</view>
		<!-- #ifdef MP -->
		<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
		<!-- #endif -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				record: [],
				currentPage: 1,
				total: 0,
				loadMore: false,
				noMoreFlag: false,
				noData1: false,
			};
		},
		onLoad() {
			this.getRecord()
		},
		methods:{
			// 获取签到记录
			getRecord(){
				this.loadMore = true
				this.$http.post('/api/auth/member/sign/list ', {memberId: this.$store.state.userInfo.memberId , currentPage:this.currentPage}).then(res => {
					this.loadMore = false
					this.total = res.data.total
					if(this.total == 0) return this.noData1 = true
					this.record = [...this.record,...res.data.rows]
				})
			}
		},
		// 到底触发
		onReachBottom() {
			if(this.total == this.record.length) return this.noMoreFlag = true
			this.currentPage++
			this.getRecord()
		}
	}
</script>

<style scoped lang="scss">
	.sign-record .list .item .data{height:80rpx;line-height:80rpx;padding:0 30rpx;font-size:24rpx;color:#666;}
	.sign-record .list .item .listn{background-color:#fff;font-size:24rpx;color:#999;}
	.sign-record .list .item .listn .itemn{height:120rpx;border-bottom:1rpx solid #eee;padding-right:30rpx;margin-left:30rpx;}
	.sign-record .list .item .listn .itemn .name{width:390rpx;font-size:28rpx;color:#282828;margin-bottom:10rpx;line-height: 1;}
	.sign-record .list .item .listn .itemn .num{font-size:36rpx;font-family: 'Guildford Pro';color:#16ac57;}
</style>
